using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;

public class TouchMethod : MonoBehaviour,IPointerDownHandler,IPointerUpHandler,IDragHandler
{
    public Action<PointerEventData> PointerDownEvent;
    public Action<PointerEventData> PointerUpEvent;
    public Action<PointerEventData> PointerMoveEvent;
    public Action<PointerEventData> PointerDragEvent;

    public void OnPointerDown(PointerEventData eventData)
    {
            PointerDownEvent?.Invoke(eventData);
    }

    public void OnPointerUp(PointerEventData eventData)
    {
            PointerUpEvent?.Invoke(eventData); 
    }

    public void OnPointerMove(PointerEventData eventData)
    {
            PointerMoveEvent?.Invoke(eventData);
    }

    public void OnDrag(PointerEventData eventData)
    {
            PointerDragEvent?.Invoke(eventData);
    }
}
